<!--
 * @Description:
 * @Author: charles
 * @Date: 2021-10-19 20:49:00
 * @LastEditors: charles
 * @LastEditTime: 2021-10-19 20:54:38
-->
<template>
  <div class="map">
    <div ref="root" />
  </div>
</template>
<script>
export default {
  mounted() {
    this.initChart()
  },
  methods: {
    initChart() {
      const container = this.$refs.root
      container.style.height = '400px'
      new AMap.Map(container, {
        zoom: 8, // 级别
        center: [120.838132, 31.472445], // 中心点坐标
        viewMode: '3D'// 使用3D视图
      })
    }
  }
}
</script>
